package beans;

import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToMany;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

import br.com.sigcoap.interfaces.IBaseEntity;


/**
 * The persistent class for the tb_disciplina database table.
 * 
 */
@Entity
@Table(name="tb_disciplina")
@NamedQuery(name="Disciplina.findAll", query="SELECT d FROM Disciplina d")
public class Disciplina implements IBaseEntity<Long> {
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	@Column(name="id_disciplina")
	private Long idDisciplina;

	private int nr_cargaHoraria;

	//bi-directional many-to-many association to Aluno
	@ManyToMany(mappedBy="tbDisciplinas")
	private List<Aluno> tbAlunos;

	//bi-directional many-to-many association to Curso
	@ManyToMany(mappedBy="tbDisciplinas")
	private List<Curso> tbCursos;

	//bi-directional many-to-many association to Professor
	@ManyToMany(mappedBy="tbDisciplinas")
	private List<Professor> tbProfessors;

	public Disciplina() {
	}

	public Long getIdDisciplina() {
		return this.idDisciplina;
	}

	public void setIdDisciplina(Long idDisciplina) {
		this.idDisciplina = idDisciplina;
	}

	public int getNr_cargaHoraria() {
		return this.nr_cargaHoraria;
	}

	public void setNr_cargaHoraria(int nr_cargaHoraria) {
		this.nr_cargaHoraria = nr_cargaHoraria;
	}

	public List<Aluno> getTbAlunos() {
		return this.tbAlunos;
	}

	public void setTbAlunos(List<Aluno> tbAlunos) {
		this.tbAlunos = tbAlunos;
	}

	public List<Curso> getTbCursos() {
		return this.tbCursos;
	}

	public void setTbCursos(List<Curso> tbCursos) {
		this.tbCursos = tbCursos;
	}

	public List<Professor> getTbProfessors() {
		return this.tbProfessors;
	}

	public void setTbProfessors(List<Professor> tbProfessors) {
		this.tbProfessors = tbProfessors;
	}

	@Override
	public Long getId() {
		return this.idDisciplina;
	}

}